fn merge(a: &Vec<i32>, b: &Vec<i32>, c: &mut Vec<i32>) {
   let mut i = 0;
   let mut j = 0; 
   loop {
       if i == a.len() && j == b.len() {
           break;
       }

       if i < a.len() && j < b.len() {
           if a[i] > b[j] {
               c.push(b[j]);
               j += 1;
           } else {
                c.push(a[i]);
               i += 1;
           }
       } else if i < a.len() {
           c.push(a[i]);
           i += 1;
       } else if j < b.len() {
           c.push(b[j]);
           j += 1;
       }
   }
}

#[test]
fn test_basic() {
    let a = vec![1, 5, 9];
    let b = vec![2, 3, 7, 15];
    let mut c: Vec<i32> = Vec::new();
    merge(&a, &b, &mut c);
    println!("{:?}", c);
    assert_eq!(c[0], 1);
    assert_eq!(c[6], 15);
}
